(function(){
    'use strict';

    var app = angular.module('myApp.login-module');
    
    app.factory( 'SessionInterceptorService', [ 'SessionService', function( SessionService ) {
        var sessionInjector = {
            request: function( config ) {
                if( SessionService.idUser ) {
                    config.headers['x-session-token'] = SessionService.loginToken;
                }
                return config;
            }
        };
        return sessionInjector;
    }]);
    
})();